<?php App::import('Sanitize'); ?>
<div class="breadcrumbs">		
	<?php
	$items = array(
		array('Home', array('controller' => 'pitches', 'action' => 'index')),
		array('Opdrachten', array('controller' => 'pitches', 'action' => 'index')),
		array($this->FixText->fix_text(Sanitize::html($designs['0']['Pitch']['title']), 15, TRUE), array('controller' => 'pitches', 'action' => 'view', $designs['0']['Pitch']['id'] )),
		array('Ontwerpen', array('controller' => 'design', 'action' => 'index', $designs['0']['Design']['id'] ))
	);
	echo $this->Navigation->breadcrumbs($items);
	?>
</div>

<div class="welcome"><h2>Gallerij </h2> <h1><?php echo $this->Html->link($designs['0']['Pitch']['title'], array('controller' => 'pitches', 'action' => 'view', $designs['0']['Pitch']['id'] )); ?></h1></div>
	<div class="content-wrapper">					
		<div class="block-white-content ui-corner-all spacer">
		<div class="clear"></div>

	<?php foreach($designs as $design): ?>
			<div class="design-block">
				<div class="design-preview">
					<p class="designer-name"><?= $this->FixText->fix_text(Sanitize::html($design['Design']['name']), 21, TRUE); ?></p>
					
					<div class="design-kader">
					<?php if(isset($design['DesignPhoto']['0']['file'])) { 
						$image = $design['DesignPhoto']['0']['file']; 
					} else {
						$image = 'designs/design.jpg';
					}
					?>
					
					<?php echo $this->Html->link($this->Html->image($image), array('controller' => 'designs', 'action' => 'view', $design['Design']['id']), array('escape' => false)); ?>
					</div>
				</div>
			</div>
	<?php endforeach; ?>

		<div class="clear"></div>
		</div>
	</div>
